package com.zhixin.project.home;

import com.zhixin.common.utils.StringUtils;
import com.zhixin.project.system.config.service.IConfigService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 *
 * @author zhixin
 */
@Controller
@RequestMapping()
public class IndexController {
    @Autowired
    IConfigService configService;

    private static final Logger log = LoggerFactory.getLogger(IndexController.class);

    private String prefix = "index/";
    private String suffix = "/index";

    @RequestMapping(value={"/index","/index/{path}"})
    public String index(@PathVariable(value="path",required=false) String path) {
        if(StringUtils.isEmpty(path)){
            path = "default";
        }
        return prefix + path + suffix;
    }
}
